<?php
/**
 * GioCMS
 * 
 * LICENSE
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-2.0.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@ninhgio.com so we can send you a copy immediately.
 * 
 * @copyright	Copyright (c) 2010-2011 GioCMS (http://cms.ninhgio.com)
 * @license		http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
 * @author		NinhGio - ninhgio@gmail.com
 * @since		1.0
 * @version		$Id:$
 */

$this->headTitle($this->TRANSLATOR->translator('common_admin_title'));
?>
<div class="col w3">
	<div class="content">
		<div class="box header mb0">
			<div class="head"><div></div></div>
			<h2><?php echo $this->TRANSLATOR->translator('dashboard_index_title'); ?></h2>
		</div>
	</div>
	<div class="content">
		<div class="desc">
			<div class="body">
				<ul>
					<?php if (isset($this->installInformation->version)) : ?>
					<li><?php echo sprintf($this->TRANSLATOR->translator('dashboard_index_giocms_version'), $this->installInformation->version); ?></li>
					<?php endif; ?>
					<?php if (isset($this->installInformation->author->name)) : ?>
					<li><?php echo sprintf($this->TRANSLATOR->translator('dashboard_index_giocms_author_name'), $this->installInformation->author->name); ?></li>
					<?php endif; ?>
					<?php if (isset($this->installInformation->author->email)) : ?>
					<li><?php echo sprintf($this->TRANSLATOR->translator('dashboard_index_giocms_author_email'), $this->installInformation->author->email); ?></li>
					<?php endif; ?>
					<?php if (isset($this->installInformation->author->website)) : ?>
					<?php $this->installInformation->author->website = 'http://' . ltrim($this->installInformation->author->website, 'http://'); ?>
					<li><?php echo sprintf($this->TRANSLATOR->translator('dashboard_index_giocms_author_website'), $this->installInformation->author->website, $this->installInformation->author->website); ?></li>
					<?php endif; ?>
					<?php if (isset($this->phpVersion)) : ?>
					<li><?php echo sprintf($this->TRANSLATOR->translator('dashboard_index_php_version'), $this->phpVersion); ?></li>
					<?php endif; ?>
					<?php if (isset($this->databaseVersion)) : ?>
					<li><?php echo sprintf($this->TRANSLATOR->translator('dashboard_index_database_version'), $this->databaseVersion); ?></li>
					<?php endif; ?>
					<?php if (isset($this->installInformation->date)) : ?>
					<li><?php echo sprintf($this->TRANSLATOR->translator('dashboard_index_giocms_date'), $this->installInformation->date); ?></li>
					<?php endif; ?>
				</ul>
			</div>
		</div>
		<div class="body_footer">
			<div class="bottom_left"><div class="bottom_right"></div></div>
		</div>
	</div>
</div>
<div class="col w7 last">
	<div class="content">
		<div class="box header mb0">
			<div class="head"><div></div></div>
			<h2><?php echo $this->TRANSLATOR->translator('dashboard_index_quickaccess'); ?></h2>
		</div>
	</div>	
	<div class="content">
		<div class="desc">
			<div class="body">		
				<?php if (isset($this->quickaccess) && $this->quickaccess) : ?>
				<ul class="g_a_quickaccess">
					<?php foreach ($this->quickaccess as $indes => $item) : ?>
					<?php $temp = explode('_', $item['route']); ?>
					<?php $module = $temp[0]; ?>
					<?php $controller = $temp[1]; ?>
					<?php $action = (isset($temp[2])) ? $temp[2] : 'index'; ?>
					<?php if ($this->ACL->isAllowed($action, $controller, $module)) : ?>
					<li>
						<a href="<?php echo $this->url($item['route']); ?>"><img class="g_a_tip_top" title="<?php echo $this->TRANSLATOR->translator($item['lang_key'], $item['module']); ?>" src="<?php echo sprintf('%s/%s', $this->APP_RESOURCE_SERVER, $item['thumbnail']); ?>" /></a><br />	
						<a class="g_a_tip" title="<?php echo $this->TRANSLATOR->translator($item['lang_key'], $item['module']); ?>" href="<?php echo $this->url($item['route']); ?>"><?php echo $this->TRANSLATOR->translator($item['lang_key'], $item['module']); ?></a>
					</li>
					<?php endif; ?>
					<?php endforeach; ?>
				</ul>
				<?php endif; ?>
				<div class="clear"></div>
			</div>
		</div> 
		<div class="body_footer">
			<div class="bottom_left"><div class="bottom_right"></div></div>
		</div>
	</div>
</div>
